package com.aispace.taichu.modules.agent;

/**
 * @author chengjie.guo
 * @since 2025/10/10
 */
public abstract class ReActAgent extends BaseAgent{

    /**
     * 思考
     * @return {@link Boolean}
     */
    protected abstract boolean think();

    /**
     * 执行
     * @return  {@link AgentExecResult}
     */
    protected abstract AgentExecResult act();


    /**
     * 执行思考-行动的步骤
     * @return {@link AgentExecResult}
     */
    @Override
    public AgentExecResult step() {
        return think() ? act() : new AgentExecResult("Thinking complete - no action needed", AgentState.RUNNING);
    }

}
